extends Node2D

var self_enemy_tscn
var self_is_red
func start_born(enemy_tscn,is_red):
	self_enemy_tscn=enemy_tscn
	self_is_red=is_red
	$AnimatedSprite.play("Flash")
	$Timer.start(1)

func _on_timeout():
	var enemy = self_enemy_tscn.instance()
	get_tree().current_scene.add_child(enemy)
	enemy.position= self.global_position
	enemy.set_is_red(self_is_red)
	$"../".current_enemys.append(enemy)
	enemy.connect("die_signal",$"../","remove_enemy",[enemy])
	$AnimatedSprite.play("Empty")
	pass # Replace with function body.
